import 'package:factoryside/bean/statistics_entity.dart';

statisticsEntityFromJson(StatisticsEntity data, Map<String, dynamic> json) {
	if (json['name'] != null) {
		data.name = json['name'].toString();
	}
	if (json['ProvinceCode'] != null) {
		data.provinceCode = json['ProvinceCode'].toString();
	}
	if (json['count'] != null) {
		data.count = json['count'] is String
				? int.tryParse(json['count'])
				: json['count'].toInt();
	}
	return data;
}

Map<String, dynamic> statisticsEntityToJson(StatisticsEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['name'] = entity.name;
	data['ProvinceCode'] = entity.provinceCode;
	data['count'] = entity.count;
	return data;
}